#if !defined(AFX_USERACCOUNTPAGE_H__74AB3DE7_DEB4_42EA_AB60_E1829079F245__INCLUDED_)
#define AFX_USERACCOUNTPAGE_H__74AB3DE7_DEB4_42EA_AB60_E1829079F245__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "DialogResize.h"
#include "UserManager.h"
#include "IconButton.h"

class CUserAccountPage : public CDialogResize
{
// Construction
public:
	void SetModified(BOOL bModified = TRUE);
	BOOL UpdateAccount(int nSelIndex = -1);
	
	BOOL m_bModified;

	CArray<CUser, CUser&> m_UserArray;
	
	CUserAccountPage(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CUserAccountPage)
	enum { IDD = IDD_PROPPAGE_ACCOUNTS };
	CIconButton	m_btnWizard;
	CIconButton	m_btnUpdate;
	CIconButton	m_btnEdit;
	CIconButton	m_btnDel;
	CIconButton	m_btnAdd;
	CListCtrl	m_UsersList;
	BOOL	m_bDisableAccount;
	CString	m_strHomeDirectory;
	CString	m_strPassword;
	BOOL	m_bAllowCreateDirectory;
	BOOL	m_bAllowDelete;
	BOOL	m_bAllowRename;
	BOOL	m_bAllowUpload;
	BOOL	m_bAllowDownload;
	//}}AFX_DATA
	
	void OnDisableAccount();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CUserAccountPage)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	void OnSelchangeUserlist();
	int m_nPreviousIndex;
	CString m_strUserName;
	CImageList m_ImageList;
	// Generated message map functions
	//{{AFX_MSG(CUserAccountPage)
	virtual BOOL OnInitDialog();
	afx_msg void OnAddUser();
	afx_msg void OnEditUser();
	afx_msg void OnDelUser();
	afx_msg void OnDblclkUsers(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnWizard();
	afx_msg void OnClickUsers(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnKeydownUsers(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnUpdate();
	afx_msg void OnBrowse();
	//}}AFX_MSG
	afx_msg void OnSomethingChanged();
	void OnUpdateModified(CCmdUI* pCmdUI);
	DECLARE_MESSAGE_MAP()

	DECLARE_DLGRESIZE_MAP;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_USERACCOUNTPAGE_H__74AB3DE7_DEB4_42EA_AB60_E1829079F245__INCLUDED_)
